package com.ucampus.dao;

import com.ucampus.entity.oS_views;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface oS_viewsMapper {
    // 分页查询获取景点简介
    @Select("SELECT id, name, content, img FROM outsideviews LIMIT #{limit} OFFSET #{offset}")
    List<oS_views> selectContent(@Param("limit") int limit, @Param("offset") int offset);

    // 根据id获取详情信息
    @Select("SELECT id, name, details, img FROM outsideviews WHERE id = #{id}")
    oS_views getViewsById(int id);
}
